package com.zzb.springcloud.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @Description 注入Spring容器的模板类
 * @CreateTime 2021/4/16 0016 16:32
 * @Author 不浪小生
 */
@Configuration
public class TemplateConfig {

    /**
     * httpClient请求模板类
     * @return
     */
    @Bean
//    @LoadBalanced
    public RestTemplate getRestTemplate() {
        return new RestTemplate();
    }
}
